{%- macro file_header() -%}
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

{% endmacro -%}

{%- macro to_const_name(attr_name) -%}
    {{attr_name | upper | replace('.', '_')}}
{%- endmacro %}

{%- macro print_value(type, value) -%}
    {%- if type == "string" -%}"{{value}}"{%-else-%}{{value}}{%-endif-%}
{%- endmacro -%}

{%- macro attribute_name(attribute) -%}
    {{to_const_name(attribute.name)}}
{%- endmacro -%}

{%- macro attribute_value_name(attribute, member) -%}
    {{ to_const_name(attribute.name) ~ "_VALUE_" ~ to_const_name(member.id) }}
{%- endmacro -%}

{%- macro stability(member) -%}
    {%- if member is stable -%}
        {{ "@stable" }}
    {%- else -%}
        {{ "@experimental" }}
    {%- endif -%}
{%- endmacro -%}